package com.io;

import java.io.*;

public class DataInputStreamDemo01 {

    public static void main(String[] args) throws IOException {
        DataInputStream inputStream = new DataInputStream(new BufferedInputStream(
                new FileInputStream("D:\\dev\\1\\dout.txt")
        ));

        String name= inputStream.readUTF();
        System.out.println("name = " + name);
        inputStream.readChar();
        int age = inputStream.readInt();
        System.out.println("age = " + age);
        boolean gender = inputStream.readBoolean();
        System.out.println("gender = " + gender);
    }
}
